package com.ruoyi.web.otherService;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.sunjob.common.domain.system.SysBusinessLog;
import com.sunjob.common.domain.system.SysExecLog;
import com.sunjob.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-08-08 10:34
 */
@FeignClient("MROLOGDB")
public interface LogService {
    @GetMapping("/queryAllExecLog")
    Result<List<SysExecLog>> queryAllExecLog();

    @GetMapping("/queryExecLogById/{logId}")
    Result<SysExecLog> queryExecLogById(@PathVariable("logId") Long logId);

    /**
     * 条件查询日志数据
     *
     * @param sysExecLog
     * @return
     */
    @PostMapping("/queryExecLogByFeign")
    Result<List<SysExecLog>> queryExecLogBy(@RequestBody SysExecLog sysExecLog);

    /**
     * 条件查询业务日志数据
     *
     * @param sysBusinessLog
     * @return
     */
    @PostMapping("/queryBusinessLogBy")
    Result<List<Map>> querySysBusinessLogBy(@RequestBody SysBusinessLog sysBusinessLog);

    /**
     * 查询指定业务日志
     * @param businessLogId
     * @return
     */
    @GetMapping("/queryBusinessLogById/{businessLogId}")
    Result<SysBusinessLog> queryBusinessLogById(@PathVariable("businessLogId") Long businessLogId);

    /**
     * 查询指定业务日志map
     * @param businessLogId
     * @return
     */
    @GetMapping("/queryBusinessLogMapById/{businessLogId}")
     Result<Map> queryBusinessLogMapById(@PathVariable("businessLogId") Long businessLogId);
}
